import request from '@/utils/request'

// 初始化接口
export function query(data) {
  return request({
    url: '/archive/list/query/query?pageNum='+data.pageNum+'&pageSize='+data.pageSize,
    method: 'post',
    data: data
  })
}

// 查询门类
export function getArchivesCategory(data) {
  return request({
    url: '/archive/list/query/category/list',
    method: 'post',
    params: data
  })
}

// 通过id获取门类id
export function getcateidbyid(data) {
  return request({
    url: '/archive/wjhsz/getcateidbyid',
    method: 'post',
    data: data
  })
}

// 获取查询条件
export function getQueryList(data) {
  return request({
    url: '/archive/list/query/apply/list',
    method: 'post',
    data: data
  })
}

// 查询前端展示分类
export function getArchivesfication(data) {
  return request({
    url: '/archive/list/query/fication/list?menuId='+data,
    method: 'post'
  })
}

// 获取查询列
export function getShowList(data) {
  return request({
    url: '/archive/list/query/field/list',
    method: 'post',
    data: data
  })
}

// 新增关键字
export function addWords(data) {
  return request({
    url: '/archive/list/query/add/words',
    method: 'post',
    data: data
  })
}

// 获取关键字
export function getKeyWords(data) {
  return request({
    url: '/archive/list/query/key/words',
    method: 'post',
    data: data
  })
}

// 获取用户详细信息
export function getInfo() {
  return request({
    url: '/system/user/getInfo',
    method: 'get'
  })
}

// 借阅车批量插入
export function batchInsert(data) {
  return request({
    url: '/archive/archiveBorrowCar/batchInsert',
    method: 'post',
    data: data
  })
}

// 查看是否有收藏权限
export function queryAuthority() {
  return request({
    url: '/archive/my/collect/queryAuthority',
    method: 'post'
  })
}

// 添加到登记单
export function addReRegister(data) {
  return request({
    url: '/archive/consult/register/addDa',
    method: 'post',
    data: data
  })
}

// 获取登记单档案列表
export function getDaList(query) {
  return request({
    url: '/archive/consult/register/da/list',
    method: 'get',
    params: query
  })
}

// 移除档案
export function delArchive(id) {
  return request({
    url: 'archive/consult/register/delDa/' + id,
    method: 'delete'
  })
}

// 提交档案
export function submitRegister(data) {
  return request({
    url: 'archive/consult/register',
    method: 'post',
    data: data
  })
}

// 获取ip地址
export function getIpAddress(data) {
  return request({
    url: 'archive/consult/register/host/ip',
    method: 'post',
    data: data
  })
}
//获取全宗号列表
export function getqzhList(menuId) {
  return request({
    url: 'archive/list/query/fonds/list?menuId='+menuId,
    method: 'post',
  })
}

//获取总条数
export function queryCount(data) {
  return request({
    url: 'archive/list/query/queryCount',
    method: 'post',
    data: data
  })
}

//批量下载
export function download_electronics(data) {
  return request({
    url: '/archive/list/query/download/electronics',
    method: 'post',
    data: {
      "dalist":data
    }
  })
}
